// 生成1000个测试充电站数据
function generateMockStations(count = 1000) {
    const stations = [];
    const brands = ['特来电', '国家电网', '星星充电', '依威', '小桔充电', '云快充'];
    const statuses = [50, 50, 50, 10, 30]; // 大部分正常，少数维护
    
    // 以成都为中心生成数据
    const centerLng = 104.06;
    const centerLat = 30.67;
    const radius = 0.5; // 50公里半径
    
    for (let i = 0; i < count; i++) {
      const angle = Math.random() * 2 * Math.PI;
      const distance = Math.random() * radius;
      
      const station = {
        stationId: `TEST-${1000 + i}`,
        stationName: `测试充电站${i + 1}`,
        address: `成都市测试区测试路${i + 1}号`,
        brandName: brands[Math.floor(Math.random() * brands.length)],
        distance: Math.random() * 10000,
        lat: centerLat + Math.cos(angle) * distance,
        lng: centerLng + Math.sin(angle) * distance,
        electricityPrice: 0.8 + Math.random() * 1.2,
        servicePrice: 0.3 + Math.random() * 0.7,
        totalCostPrice: 1.2 + Math.random() * 1.5,
        openTime: "00:00-24:00",
        parkFee: "前2小时免费",
        operatorId: `OP${Math.floor(100000 + Math.random() * 900000)}`,
        stationTel: `138${Math.floor(10000000 + Math.random() * 90000000)}`,
        quickAvailableNum: Math.floor(Math.random() * 10),
        quickChargeNum: Math.floor(5 + Math.random() * 15),
        slowAvailableNum: Math.floor(Math.random() * 8),
        slowChargeNum: Math.floor(3 + Math.random() * 12),
        openStatus: 1,
        stationStatus: statuses[Math.floor(Math.random() * statuses.length)],
        brandType: Math.floor(Math.random() * 5) + 1,
        parkCost: Math.floor(Math.random() * 5),
        stationCategory: [Math.floor(Math.random() * 100)],
        stationGradeScore: (Math.random() * 5).toFixed(1),
        stationLevel: Math.floor(Math.random() * 3)
      };
      
      stations.push(station);
    }
    
    return {
      pageIndex: 1,
      pageSize: count,
      stationList: stations,
      total: count,
      totalPage: 1
    };
  }
  
  // 保存到文件（在浏览器中运行这个函数，然后复制输出到 mockStations.json）
  console.log(JSON.stringify(generateMockStations(1000), null, 2));